//
//  WeclomeViewController.swift
//  weibo
//
//  Created by 叶子韬韬 on 2017/5/2.
//  Copyright © 2017年 叶子韬韬. All rights reserved.
//

import UIKit
import SDWebImage
class WeclomeViewController: UIViewController {

    
    // MARK:- #注释> 拖现属性
    
    @IBOutlet weak var IconViewBottomCons: NSLayoutConstraint!
    
    @IBOutlet weak var iconView: UIImageView!
    override func viewDidLoad() {
        super.viewDidLoad()
        let urlStr = UserAccoutViewModel.shareInstance.account?.avatar_large
        let url = URL(string: urlStr ?? "")
        iconView.sd_setImage(with: url, placeholderImage: UIImage(named: "avatar_default"))
        //改变约束值
        IconViewBottomCons.constant = UIScreen.main.bounds.height - 200;
        
        UIView.animate(withDuration: 1, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 1, options: [], animations: {
            self.view.layoutIfNeeded()
        }) { (_) in
            UIApplication.shared.keyWindow?.rootViewController = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()
        }
        
      
        
    }



}
